<%@ Page Language="C#" MasterPageFile="~/IPMSMasterPage.master" AutoEventWireup="true"
    CodeFile="OptProjectGroups.aspx.cs" Inherits="OptProjectGroups" Title="Project Monitoring System"
    Culture="auto:en-US" UICulture="Auto" meta:resourcekey="PageResource1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
    Visible="false">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
<div style="margin-left:10px;margin-right:10px;">
    <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtSearch_CreateDate"
        Enabled="True" Format="dd/MM/yyyy">
    </cc1:CalendarExtender>
    <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtSearch_CreateDateEnding"
        Enabled="True" Format="dd/MM/yyyy">
    </cc1:CalendarExtender>


    <asp:Panel ID="panelSearch" runat="server" DefaultButton="btnSearch" meta:resourcekey="Panel2Resource1">
        <fieldset>
            <legend>
                <asp:Label ID="lblSearch" runat="server" Text="Search" meta:resourcekey="lblSearchResource1"></asp:Label></legend>
            <table>
                <tr>
                    <td width="100" align="left">
                        <asp:Label ID="lblSearch_PGI" runat="server" Text="Project Group ID" meta:resourcekey="lblSearch_PGIResource1"></asp:Label>
                    </td>
                    <td width="200" align="left">
                        <asp:TextBox ID="txtSearch_PGI" runat="server" MaxLength="30"/>
                    </td>
                    <td width="80" align="left">
                        <asp:Label ID="lblSearchTitleSubject" runat="server" Text="Title/Subject" meta:resourcekey="lblTitleSubjectResource1"></asp:Label>
                    </td>
                    <td width="200" align="left">
                        <asp:TextBox ID="txtSearchTitleSubject" runat="server" MaxLength="60" />
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:Label ID="lblSearch_OfficerName" runat="server" Text="Officer Name" meta:resourcekey="lblSearch_OfficerNameResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtSearch_OfficerName" runat="server" MaxLength="30"/>
                    </td>
                    <td align="left">
                        <asp:Label ID="lblSearchType" runat="server" Text="Type" meta:resourcekey="lblTypeResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="ddlSearchType" runat="server" DataTextField="Code"
                            DataValueField="Code" CausesValidation="True">
                            <asp:ListItem Text=""></asp:ListItem>
                            <asp:ListItem Text="Design"></asp:ListItem>
                            <asp:ListItem Text="Patent"></asp:ListItem>
                            <asp:ListItem Text="Trademark"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:Label ID="lbSearchlApplicant" runat="server" Text="Applicant" meta:resourcekey="lblApplicantResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtSearchApplicant" runat="server" MaxLength="30" />
                    </td>
                    <td align="left">
                        <asp:Label ID="lblSearchClient" runat="server" Text="Client" meta:resourcekey="lblClientResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="ddlSearchClient" runat="server">
                            <asp:ListItem Text=""></asp:ListItem>
                            <asp:ListItem Text="Design"></asp:ListItem>
                            <asp:ListItem Text="Patent"></asp:ListItem>
                            <asp:ListItem Text="Trademark"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:Label ID="lblSearchInventor" runat="server" Text="Inventor" meta:resourcekey="lblInventorResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtSearchInventor" runat="server" MaxLength="30" />
                    </td>
                    <td align="left">
                        <asp:Label ID="lblSearch_CreateDate" runat="server" Text="Create Date" meta:resourcekey="lblSearch_CreateDateResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtSearch_CreateDate" runat="server" Width="107px" />
                    </td>
                    <td width="80" align="left">
                        <asp:Label ID="lblSearchEnding" runat="server" Text="Ending" meta:resourcekey="lblEndingResource1"></asp:Label>
                    </td>
                    <td width="200" align="left">
                        <asp:TextBox ID="txtSearch_CreateDateEnding" runat="server" Width="90px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="6" align="center">
                        <asp:Button ID="btnSearch" runat="server" CausesValidation="False" CssClass="submit" Text="Search" OnClick="btnSearch_Click" meta:resourcekey="btnSearchResource1" />
                        <asp:Button ID="btnNewProjectGroup" runat="server" CausesValidation="False" CssClass="submit" Text="New Project Group" OnClick="btnNewProjectGroup_Click" meta:resourcekey="btnNewProjectGroupResource1" />
                    </td>
                </tr>
            </table>
        </fieldset>
    </asp:Panel>
    <table>
    <tr>
        <td align="center" width="100%">
            <asp:Label ID="lblError" runat="server" ForeColor="Red" Width="100%" CssClass="error" meta:resourcekey="lblErrorResource1" />
        </td>
    </tr>
    </table>
    <asp:Panel ID="panelActive" runat="server" meta:resourcekey="ActivePanelResource1">
        <fieldset>
            <legend>
                <asp:Label ID="lblActive" runat="server" Text="Active Project Group" meta:resourcekey="lblActiveResource1"></asp:Label>
            </legend>
            <asp:GridView CssClass="Grid" ID="gvActive" runat="server" 
                BackColor="#DEBA84" BorderColor="#660000"
                BorderStyle="Solid" BorderWidth="1px" CellPadding="0" CellSpacing="0" Width="100%"
                Height="1%" AllowPaging="True" PageSize="10" AllowSorting="True" 
                EmptyDataText="No Acitve Project Group Record Available!"
                AutoGenerateColumns="False" meta:resourcekey="gvActiveResource1" 
                DataKeyNames="ProjectGroupID" 
                onpageindexchanging="gvActive_PageIndexChanging" 
                onrowcommand="gvActive_RowCommand" 
                onselectedindexchanged="gvActive_SelectedIndexChanged">
                <Columns>
                    <asp:ButtonField CommandName="Select" DataTextField="ProjectGroupID" HeaderText="Project Group ID" Text="Button" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource1"/>
                    <asp:BoundField DataField="TitleSubject" HeaderText="Title/Subject" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource2" />
                    <asp:BoundField DataField="OfficerName" HeaderText="OfficerName" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource3" />
                    <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="False"  ItemStyle-HorizontalAlign="Center" meta:resourcekey="BoundFieldResource4" />
                    <asp:BoundField DataField="Applicant" HeaderText="Applicant" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource5" />
                    <asp:BoundField DataField="Inventor" HeaderText="Inventor" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource6" />
                    <asp:BoundField DataField="Type" HeaderText="Type" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource7" />
                    <asp:BoundField DataField="Client" HeaderText="Client" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource8" />
                    <asp:BoundField DataField="UpdateIP" HeaderText="IP Address" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource9" />
                    <asp:BoundField DataField="UpdateBy" HeaderText="Updated By" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource10" />
                    <asp:BoundField DataField="UpdateDate" HeaderText="Last Update Date" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="False" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource11" />
                    <asp:TemplateField HeaderText="" ItemStyle-Width="60" ItemStyle-HorizontalAlign="center">
                        <ItemTemplate>
                            <a href="OptProjectGroupUpdate.aspx?ProjectGroupID=<%# Eval("ProjectGroupID")%>"><img src="Images/icon-edit.gif" border="0" /></a>
                            <asp:ImageButton ID="imgBtnDelete" CommandName="halfDelete" runat="server" ImageUrl="Images/icon-delete.jpg" OnClientClick="javascript:return confirm('Do you want to delete the record?');"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
                <RowStyle CssClass="GridRowStyle" />
                <AlternatingRowStyle CssClass="GridAltRowStyle" />
                <SelectedRowStyle CssClass="GridSelectedRowStyle" />
                <PagerStyle CssClass="GridPagerStyle" ForeColor="White" />
                <FooterStyle CssClass="GridFooterStyle" />
            </asp:GridView>
        </fieldset>
    </asp:Panel>
    
    <asp:Panel ID="panelDeleted" runat="server" meta:resourcekey="ActivePanelResource1">
        <fieldset>
            <legend>
                <asp:Label ID="lblDeleted" runat="server" Text="Deleted Project Group" meta:resourcekey="lblDeletedResource1"></asp:Label>
            </legend>
            <asp:GridView CssClass="Grid" ID="gvDeleted" runat="server" 
                BackColor="#DEBA84" BorderColor="#660000"
                BorderStyle="Solid" BorderWidth="1px" CellPadding="0" CellSpacing="0" Width="100%"
                Height="1%" AllowPaging="True" PageSize="10" AllowSorting="True" 
                EmptyDataText="No Deleted Project Group Record Available."
                AutoGenerateColumns="False" meta:resourcekey="gvActiveResource1" 
                DataKeyNames="ProjectGroupID" 
                onpageindexchanging="gvDeleted_PageIndexChanging" 
                onrowcommand="gvDeleted_RowCommand">
                <Columns>
                    <asp:BoundField DataField="ProjectGroupID" HeaderText="Project Group ID" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource12" />
                    <asp:BoundField DataField="TitleSubject" HeaderText="Title/Subject" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource13" />
                    <asp:BoundField DataField="OfficerName" HeaderText="OfficerName" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource14" />
                    <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="False" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource15" />
                    <asp:BoundField DataField="Applicant" HeaderText="Applicant" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource16" />
                    <asp:BoundField DataField="Inventor" HeaderText="Inventor" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource17" />
                    <asp:BoundField DataField="Type" HeaderText="Type" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource18" />
                    <asp:BoundField DataField="Client" HeaderText="Client" ItemStyle-HorizontalAlign="Left" meta:resourcekey="BoundFieldResource19" />
                    <asp:BoundField DataField="DeleteIP" HeaderText="IP Address" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource20" />
                    <asp:BoundField DataField="DeleteBy" HeaderText="Deleted By" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource21" />
                    <asp:BoundField DataField="DeleteDate" HeaderText="Delete Date" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="False" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource22" />
                    <asp:TemplateField ItemStyle-Width="60" ItemStyle-HorizontalAlign="center" HeaderText="">
                        <ItemTemplate>
                            <asp:ImageButton ID="lbtnRestore" CommandName="Restore" runat="server" ImageUrl="Images/icon-restore.jpg"/>
                            <asp:ImageButton ID="lbtnFroceDelete" CommandName="ForceDelete" runat="server" ImageUrl="Images/icon-trash.gif" OnClientClick="javascript:return confirm('Do you want to delete the record?');"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <RowStyle CssClass="GridRowStyle" />
                <AlternatingRowStyle CssClass="GridAltRowStyle" />
                <SelectedRowStyle CssClass="GridSelectedRowStyle" />
                <PagerStyle CssClass="GridPagerStyle" ForeColor="White" />
                <HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
            </asp:GridView>
        </fieldset>
    </asp:Panel>
</div>
</asp:Content>
